A demo of Coco: a compiler for monadic coercions in ML

نویسندگان

  • Nataliya Guts
  • Michael Hicks
  • Nikhil Swamy
  • Daan Leijen
چکیده

Combining monadic computations may induce a significant syntactic overhead. To allow monadic programming in direct style, we have developed Coco, a type-based tool that automatically rewrites ML code inserting necessary binds, unit, and morphisms between monads. This tool demonstration will show how to take advantage of Coco to facilitate using monadic libraries in practice, and will discuss possible future development of Coco to fit the actual needs of programmers.

برای دانلود متن کامل این مقاله و بیش از 32 میلیون مقاله دیگر ابتدا ثبت نام کنید

ثبت نام

اگر عضو سایت هستید لطفا وارد حساب کاربری خود شوید

منابع مشابه

Explicit Effect Subtyping (Extended Version)

As popularity of algebraic effects and handlers increases, so does a demand for their efficient execution. Eff, an ML-like language with native support for handlers, has a subtyping-based effect system on which an effect-aware optimizing compiler could be built. Unfortunately, in our experience, implementing optimizations for Eff is overly error-prone because its core language is implicitly-typ...

متن کامل

Strong Normalization of ML via a Calculus of Coercions

ML is a type system extending ML with first-class polymorphism as in system F. The main goal of the present paper is to show that ML enjoys strong normalization, i.e., it has no infinite reduction paths. The proof of this result is achieved in several steps. We first focus on xML, the Church-style version of ML, and show that it can be translated into a calculus of coercions: terms are mapped i...

متن کامل

Strong normalization of MLF via a calculus of coercions

ML is a type system extending ML with first-class polymorphism as in system F. The main goal of the present paper is to show that ML enjoys strong normalization, i.e., it has no infinite reduction paths. The proof of this result is achieved in several steps. We first focus on xML, the Church-style version of ML, and show that it can be translated into a calculus of coercions: terms are mapped i...

متن کامل

Compiling with Types

This paper presents a program transformation, representation analysis, that makes it possible for languages with polymorphic types, such as ML, to use unboxed data representations in monomorphic code. The solution the paper presents involves the use of coercions to convert back and forth between unboxed representations used by monomorphic functions to the boxed representation used by polymorphi...

متن کامل

Flow-Directed Closure Conversion for Typed Languages

This paper presents a novel closure conversion strategy which is part of MLton, a whole-program compiler for Standard ML. Unlike other implementations, MLton performs closure-conversion at an early stage to translate programs to a simply-typed rst-order intermediate language upon which most optimizations are performed. Closure conversion is guided by a global control-ow analysis. Like previous ...

متن کامل

ذخیره در منابع من


  با ذخیره ی این منبع در منابع من، دسترسی به آن را برای استفاده های بعدی آسان تر کنید

برای دانلود متن کامل این مقاله و بیش از 32 میلیون مقاله دیگر ابتدا ثبت نام کنید

ثبت نام

اگر عضو سایت هستید لطفا وارد حساب کاربری خود شوید

عنوان ژورنال:

دوره   شماره 

صفحات  -

تاریخ انتشار 2011